package pers.xx.sbm.vo;

import pers.xx.sbm.entity.Seckill;

/**
 * @author ：xiexing
 * @description：秒杀数据值对象
 * @date ：2020/8/10 10:12
 */
public class SeckillVo {

    private String seckillId;//秒杀单号
    private String name;//商品名称
    private int number;//数量
    private String startTime;//开始时间
    private String endTime;//结束时间
    private String createTime;//创建时间

    public SeckillVo() {

    }
    public SeckillVo(Seckill seckill) {
        this.seckillId = String.valueOf(seckill.getSeckillId());
        this.name = seckill.getName();
        this.number = seckill.getNumber();
        this.startTime = String.valueOf(seckill.getStartTime().getTime());
        this.endTime = String.valueOf(seckill.getEndTime().getTime());
        this.createTime = String.valueOf(seckill.getCreateTime().getTime());

    }

    public String getSeckillId() {
        return seckillId;
    }

    public void setSeckillId(String seckillId) {
        this.seckillId = seckillId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "SeckillVo{" +
                "seckillId='" + seckillId + '\'' +
                ", name='" + name + '\'' +
                ", number=" + number +
                ", startTime='" + startTime + '\'' +
                ", endTime='" + endTime + '\'' +
                ", createTime='" + createTime + '\'' +
                '}';
    }
}
